﻿using System;

namespace Xlit.Standard.Entity
{
    /// <summary>
    ///  实体类接口
    /// </summary>
    public interface IEntity
    {
        /// <summary>
        ///  数据插入时间
        /// </summary>
        DateTime InsertDate { get; set; }
        /// <summary>
        ///  是否有主键
        /// </summary>
        /// <returns></returns>
        bool IsTransient();
    }

    /// <summary>
    ///  实体类接口
    /// </summary>
    /// <typeparam name="TPrimaryKey"></typeparam>
    public interface IEntity<TPrimaryKey> : IEntity
    {
        /// <summary>
        ///  主键
        /// </summary>
        TPrimaryKey Id { get; set; }
    }
}
